<?php require_once("php/addressBookManager.php"); ?>
<?php include"header.inc.php"; ?>
<script language="JavaScript">
</script>
<tr align="center">
	<td colspan="2">
		<TABLE id="Table6" cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">													
			<TR>
				<TD width="200" valign="top" class="left_bg" align="right" ><br><?php include("left.inc.php");?></td>
				<td height="10" valign="top" class="mainBoxBg">		
					<table width="100%"  border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="100%" valign="top" align="center">
								<table width="100%"  border="0" cellpadding="0" cellspacing="1" >
									<tr>
										<td  align="left" background="images/heading_bg.gif" bgcolor="#FFFFFF" class="h1">
											<table   border="0" cellspacing="0" cellpadding="0" align="left" width="100%">
												<tr>
													<td height="42" background="images/bg3.gif" width="53"  class="h1" align="right"><img src="images/cp_icon.gif" width="25" height="25" hspace="5"></td>
													<td height="42"  background="images/bg3.gif" align="left" class="h1">Address  Manager</td>
													<td height="42"  background="images/bg3.gif" align="right" class="h1"><a href='exportData.php' class="blue_txt"><u>Export</u></a>&nbsp;|&nbsp;<a href='addressBookAe.php' class="blue_txt"><u>Add New Address</u></a>&nbsp;&nbsp;</td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td height="272" align="center" valign="top" >
											<table width="100%"  border="0" cellpadding="0" cellspacing="1" >
												<tr>
													<td height="272" align="center" valign="top" class="mainBoxBg"><br/>
														<table width="50%"  border="0" cellpadding="3" cellspacing="1" bgcolor="#D2CEC8" class="tblBg">
															<form name="frmSearch" action="" method="get">
															<tr>
																<td colspan="2" class="header_row">Search Address </td>
															</tr>
															<tr class="oddRow">
															  <td align="right" class="gray_txt">Organization Type </td>
															  <td><?php echo getCombo($arrOrganiationType,$comboName='sOrganizationType',$class='textbox',$selectedValue = $organizationType, $extra = ''); ?></td>
															  </tr>
															<tr class="oddRow">
															  <td align="right" class="gray_txt">Organization Name </td>
															  <td><input name="sOrganizationName" type="text" class="textbox" value="" /></td>
															  </tr>
															<tr class="oddRow">
																<td width="48%" align="right" class="gray_txt">First Name </td>
																<td width="52%"><input name="sFirstName" type="text" class="textbox" value=""></td>
															</tr>
															<tr class="evenRow">
															  <td align="right" class="gray_txt">Middle Name </td>
															  <td><input name="sMiddleName" type="text" class="textbox" value="" /></td>
															  </tr>
															<tr class="evenRow">
																<td width="48%" align="right" class="gray_txt">Last Name </td>
																<td width="52%"><input name="sLastName" type="text" class="textbox" value=""></td>
															</tr>
															<tr class="oddRow">
																<td align="right" class="gray_txt">Email Address </td>
																<td><input name="sEmailAddress" type="text" class="textbox" value="<?=$sEmailAddress?>"></td>
															</tr>
															<tr class="evenRow">
																<td>&nbsp;</td>
																<td><input name="Submit" type="submit" class="buttons" value="Search"></td>
															</tr>
															</form>
														</table>
														<br/><?php echo displaySessMesg(); ?><br/>
														<table width="97%" border="0" cellpadding="3" cellspacing="1" class="tblBg">
															<form name="form_l" action="" method="post">
															<tr class="header_row">
																<td width="86" align="center">Sr.No.</td>
																<td width="326" align="left">Company Name </td>
																<td width="326" align="left">Name</td>
																<td width="205" align="left">Email</td>
																<td width="105" align="center">Status</td>
																<td width="141" align="center">Edit Detail</td>																
															  <td width="70" align="center"><input name="check_all" type="checkbox" class="style1" id="check_all" onClick="checkall(this.form)" value="check_all"></td>
															</tr>
																<?php
																if(mysql_num_rows($resPL)>0)
																{
																while($rowPL = mysql_fetch_array($resPL))
																{
																$i++;
																if($rowClass == 'evenRow') $rowClass = 'oddRow';  else $rowClass = 'evenRow';
																?>
															<tr class="main_txt <?=$rowClass?>">
																<td align="center" class="gray_txt"><?=$i?>.</td>
																<td align="left"><?=$rowPL['organizationName']?></td>
																<td align="left"><?=$rowPL['firstName']." ".$rowPL['lastName']?></td>
																<td align="left"><?=$rowPL['email']?></td>
																<td align="center"><?php if($rowPL['status']) echo "Active"; else echo "InActive"; ?></td>
																<td align="center"><a href="addressBookAe.php?id=<?=$rowPL['id']?>" class="simple_links"><img src="images/edit_icon.gif" width="16" height="16" border="0"></a></td>
																<td align="center"><input type="checkbox" name="chkIds[]" value="<?=$rowPL['id']?>"></td>
															</tr>
															<?php } if($rowClass == 'evenRow') $rowClass = 'oddRow';  else $rowClass = 'evenRow'; ?>
															<tr align="right" class="<?=$rowClass?>">
																<td colspan="10">
																
																<?=getNewsletterTemplate($name = 'template', $class = 'gray_txt', $selected=$template, $extra='')?>
																<input name="Submit" type="submit" class="buttons" value="Send Mail To All">
                    <input name="Submit" type="submit" class="buttons" value="Send Mail To Selected">
																
																
																<input name="Submit" type="submit" class="buttons" value="Active">
																	<input name="Submit" type="submit" class="buttons" value="Inactive">
																	<input name="Submit" type="submit" class="buttons" value="Delete" onClick="return del(this.form)">																</td>
															</tr>
															<?php if($bgColor == 'eeeeee') $bgColor = 'f6f6f6';  else $bgColor = 'eeeeee';?>
															<tr bgcolor="<?=$bgColor?>">
																<td colspan="10" align="right"><?php echo rightPaging();?></td>
															</tr>
															<?php }else{ ?>
															<tr align="left" bgcolor="#FFFFFF">
																<td height="25" colspan="10" class="redtxt"> Sorry, no record found.</td>
															</tr>
															<?php } ?>
															</form>
													  </table>
														<br/>
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</TR>
		</TABLE>
	</td>
</tr>
<?php include ("footer.inc.php"); ?>